package com.spring.el;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component("customerBean")
public class Customer {
	
	@Value("#{itemBean}")
	private Item item;

	@Value("#{itemBean.name}")
	private String itemName;
	
	@Value("#{itemBean.getFull('hello')}")
	private String fullAddress;
	
	@Value("#{'hello'.toUpperCase()}")
	private String name;

	public Item getItem() {
		return item;
	}

	public void setItem(Item item) {
		this.item = item;
	}

	public String getItemName() {
		return itemName;
	}

	public void setItemName(String itemName) {
		this.itemName = itemName;
	}
	
	public String getFullAddress() {
		return fullAddress;
	}

	public void setFullAddress(String fullAddress) {
		this.fullAddress = fullAddress;
	}
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public String toString() {
		return "Customer [item=" + item + ", itemName=" + itemName + ", fullAddress=" + fullAddress + ", name=" + name
				+ "]";
	}

}
